﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using RrslLite.Dsl;
using RrslLite.Net.Contracts;

namespace RrslLite.Net.BatchImpl
{
    public class DuplexBatchBuilder : BatchBuilder
    {
        public new virtual DuplexWcfBatch CurrentBatch
        {
            get { return (DuplexWcfBatch) base.CurrentBatch; }
        }

        protected override IBatchCallBuilder<TTarget> CreateBatchCallBuilder<TTarget>()
        {
            return new DuplexBatchCallBuilder<TTarget>(this);
        }

        protected override Batch CreateBatch()
        {
            return
                new DuplexWcfBatch(
                    Configuration.RrslLiteConfiguration.Instance.BatchBuilderConfiguration.
                        GetDuplexMessageProcessorProxy());
        }
    }
}
